# _*_coding : UTF-8_*_
from Python_hero.hero1 import Ez, Jxin


class HeroFactory:
    def hero_factory(self,hero_name):
        if hero_name == "EZ":
            return Ez()
        elif hero_name =="Jxin":
            return Jxin()
        else:
            print("该英雄不在英雄池")
shur=HeroFactory()
a=shur.hero_factory("EZ")
b=shur.hero_factory("Jxin")
a.fight(b.hero_hp,b.hero_power,b.hero_name)
